package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.time.LocalDateTime;

@Data
@TableName("slide")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class Slide {
    @Column(name = "id",comment = "轮播图id",isKey = true,isAutoIncrement = true)
    Long id;

    @Column(name = "pic_url",comment = "图片地址")
    String picUrl;

    @Column(name = "pic_name",comment = "图片名称")
    String picName;

    @Column(name = "is_enable",comment = "是否启用")
    Short isEnable;

    @Column(name = "sort",comment = "排序")
    Integer sort;

    @Column(name = "creation_time")
    @TableField(fill = FieldFill.INSERT)
    LocalDateTime creationTime;

    @Column(name = "last_modification_time",comment = "")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;
}
